{extend name="base"}
{block name="title"}提现设置{/block}
{block name="head"}
<script>
$(function () {
  $('input[name=btnSubmit]').click(function () {
    var data = [];
    var trs = $('.tab-content tr');
    trs.each(function (k, tr) {
      var row = $('input', tr).serializeArray();
      if (row.length > 0) {
        var elm = {};
        $.each(row, function (a, b) {
          elm[b.name] = b.value;
        });
        data.push(elm);
      }
    });
    console.log(data);
    $.post("{:url('config')}", {data:data},function (resp, state, xhr) {
      console.log(resp);
      alert(resp.error);
      if (resp.errno == 0) {
        location.reload();
      }
    });
    return false;
  });
});
</script>
{/block}
{block name="body"}
<body class="mainbody">
<!--导航栏-->
<div class="location">
  <a href="javascript:history.back(-1);" class="back"><i class="iconfont icon-up"></i><span>返回上一页</span></a>
  <a href="{:url('index/home')}" class="home"><i class="iconfont icon-home"></i><span>首页</span></a>
  <i class="arrow iconfont icon-arrow-right"></i>
  <span>提现设置</span>
</div>
<!--/导航栏-->

<!--内容-->
<div id="floatHead" class="content-tab-wrap">
  <div class="content-tab">
    <div class="content-tab-ul-wrap">
      <ul>
        <li><a class="selected" href="javascript:;">提现设置</a></li>
      </ul>
    </div>
  </div>
</div>

<div class="tab-content">

  <div class="table-container">
    <table border="0" cellspacing="0" cellpadding="0" class="border-table">
      <thead>
        <tr>
          <th>ID</th>
          <th>公众号</th>
          <th>开启提现</th>
          <th>最低提现(元)</th>
          <th>佣金池(元)</th>
          <th>更新时间</th>
          <th>低于多少报警(元)</th>
          <th>报警手机号码</th>
          <th>备注</th>
        </tr>
      </thead>
      <tbody>
{empty name="list"}
        <tr><td colspan="9">Oh~暂无数据!</td></tr>
{else/}
      {volist name="list" id="v"}
        <tr>
          <td>{$v.ID}<input type="hidden" name="ID" value="{$v.ID}" /></td>
          <td>{$v.AppName}</td>
          <td><div class="rule-single-checkbox"><input type="checkbox" name="CashCase" value="1"{gt name="v.CashCase" value="0"} checked{/gt} /></div></td>
          <td><input type="text" class="input small" autocomplete="off" name="CashMin" value="{$v.CashMin*1}" /></td>
          <td><input type="text" class="input small" autocomplete="off" name="CashPool" value="{$v.CashPool*1}" /></td>
          <td>{$v.UpdateTime}</td>
          <td><input type="text" class="input small" autocomplete="off" name="WarnMin" value="{$v.WarnMin*1}" /></td>
          <td><input type="text" class="input" autocomplete="off" name="WarnTel" value="{$v.WarnTel}" /></td>
          <td><input type="text" class="input" autocomplete="off" name="Remark" value="{$v.Remark}" /></td>
        </tr>
      {/volist}
{/empty}
      </tbody>
    </table>
  </div>

</div>
<!--/内容-->

<!--工具栏-->
<div class="page-footer">
  <div class="btn-wrap">
    <input type="button" name="btnSubmit" value="提交保存" class="btn" />
    <input type="button" name="btnReturn" value="返回上一页" class="btn yellow" onclick="javascript:history.back(-1);" />
  </div>
</div>
<!--/工具栏-->
</body>
{/block}